package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.CollectQueryObject;
import cn.wolfcode.trip.base.query.SearchQueryObject;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IStrategyService {
    /**
     * 新增和编辑
     * @param strategy
     */
    void saveOrUpdate(Strategy strategy);

    PageInfo query(StrategyQueryObject qo);

    List<Strategy> selectAll();



    Strategy selectStrategyById(Long id);

    /**
     * 通过关键字查询该攻略总数
     * @param keyword
     * @return
     */
    int selectCountByKeyword(String keyword);

    /**
     * 通过关键字查询攻略
     * @param qo
     * @return
     */
    PageInfo searchQuery(SearchQueryObject qo);

    /**
     * 查询用户收藏的攻略
     * @param qo
     * @return
     */
    PageInfo selectForCollect(CollectQueryObject qo);
}
